Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
Is there some method to convert Date from datepicker (input type="date") to ISO 8601?

I have on my site form with input date, which I am now returning as Date - RFC 3339.

I want to have ISO 8601 - value of input date to looks like 2021-12-8T04:30:00-06:00. Convert date RFC 3339 to date in format ISO 8601. Is there some method to do that? Or some library to javascript I can use?

const dateTaskField = document.querySelector('#new-task-date');
dateTaskField.valueAsDate = new Date();
<input type="date" id="new-task-date">

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Solved by assigning it to new Date() function:

const endDateIso = new Date(dateTaskField.value).toISOString();

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!